package com.note.simpleshop.module.goods.service;

import com.note.simpleshop.entity.TbClassify;
import com.note.simpleshop.module.goods.dao.ClassifyRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClassifyService {
    private static final String CACHE_NAME="classify_cache";
    @Autowired
    private ClassifyRepository classifyRepository;
    @Cacheable(CACHE_NAME)
    public List<TbClassify> findAll()
    {
        return classifyRepository.findAll();
    }
}
